package com.joey.jvm.example.init;

import java.util.Date;

/**
 * @Author hyy
 **/
public class User {
    private int id;
    private String name;
    private boolean flag;
    private Date createDate;

    public User(){
        System.out.println("初始化对象");
    }

    public User(int id, String name, boolean flag, Date createDate) {
        this.id = id;
        this.name = name;
        this.flag = flag;
        this.createDate = createDate;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", flag=" + flag +
                ", createDate=" + createDate +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
}
